-- GENERATED SPELL FOR [Coilfang Guardian] --


function spell0_21873(pUnit, Event) --@Arcing Smash,n/a--
pUnit:FullCastSpellOnTarget(28168,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21873', 563, 1)
end

function spell1_21873(pUnit, Event) --@Hamstring,n/a--
pUnit:FullCastSpellOnTarget(9080,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21873', 10278, 1)
end

function spell2_21873(pUnit, Event) --@Teleport,n/a--
pUnit:FullCastSpellOnTarget(39700,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21873', 598, 1)
end

function Sorts_21873(pUnit, Event)
local choix_sorts_21873 = math.random(0, 2)
if choix_sorts_21873 == 0 then
pUnit:RegisterEvent('spell0_21873', 1, 1)
end
if choix_sorts_21873 == 1 then
pUnit:RegisterEvent('spell1_21873', 1, 1)
end
if choix_sorts_21873 == 2 then
pUnit:RegisterEvent('spell2_21873', 1, 1)
end
end

function mob21873_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21873', math.random(1500, 3000), 1)
end

function mob21873_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21873_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21873_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21873, 1, 'mob21873_Action')
RegisterUnitEvent(21873, 2, 'mob21873_Leave')
RegisterUnitEvent(21873, 3, 'mob21873_Kill')
RegisterUnitEvent(21873, 4, 'mob21873_Die')
